package com.rh.manage.exception;

import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

/**
 * 异常的错误信息
 */
@Getter
@RequiredArgsConstructor
public enum ErrorCodeEnum {
    // 基础功能
    PARAMETER_ERROR(0, "参数错误"),
    UNKNOWN_BUSINESS_SITUATION_ERROR(1, "未知业务情况错误"),
    // 文件
    FAILED_TO_WRITE_CONFIGURATION_FILE(1000, "配置文件写入失败"),
    // git
    GIT_OPERATION_OBJECT_CREATION_FAILED(5000, "git操作对象创建失败"),
    GIT_ADD_OPERATION_FAILED(5001, "git add 操作失败"),
    COMMIT_OPERATION_FAILED(5002, "commit 操作失败"),
    PULL_OPERATION_FAILED(5003, "pull 操作失败"),
    CANCEL_OPEN_PROJECT(5004, "git同步失败, 取消打开项目"),
    GIT_MERGE_RECOVERY_FAILED(5005, "git合并恢复失败, 取消打开项目"),
    GIT_PUSH_FAILED(5006, "git推送失败, 取消打开项目"),
    RESET_OPERATION_FAILED(5007, "reset 操作失败"),
    ;
    @NonNull
    private Integer code;
    @NonNull
    private String msg;
}
